import requests

class SDKClient:
    def __init__(self):
        self.base_url = "http://49.233.108.117:3000/api/v1"

    def do_request(self,method:str, url:str,params=None, data=None,**kwargs):
        method = method.lower()
        print(f'发送{method}请求，url:{self.base_url+url}')
        try:
            if method=="get":
                return requests.get(self.base_url+url,params=params,**kwargs)
            elif method=="post":
                return requests.post(self.base_url+url,data=data,**kwargs)
        except Exception:
            print("程序出现异常")